<template>
  <div class="app-container">
    <!-- 切换 -->
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="借入/借出列表" name="1">
        <list />
      </el-tab-pane>
      <el-tab-pane label="历史借入/借出记录" name="2">
        <Historylist />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import list from "./component/list";
import Historylist from "./component/Historylist";

export default {
  components: { list, Historylist },
  data() {
    return {
      //默认tab切换为1
      activeName: "1",
    };
  },
  created() {
    this.handleSearch();
  },
  methods: {
    //点击tab切换
    handleClick() {
      this.activeName = "2";
    },
    handleSearch(){}
  },
};
</script>

<style scoped lang="scss" >
.clearfix {
  line-height: 40px;
  display: flex;
}
</style>
